﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace XiaoGang.Soft.XGWMS.UI
{
    public partial class FormStoreRoomSelect : Form
    {
        public FormStoreRoomSelect()
        {
            InitializeComponent();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void FormStoreRoomSelect_KeyUp(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
                case Keys.Escape:
                    if (this.Cursor == Cursors.WaitCursor)
                    {
                        return;
                    }
                    this.Close();
                    break;
                //case Keys.Enter:
                //    btnNext_Click(btnNext, e);
                //    break;
            }
        }

        private void btnNext_Click(object sender, EventArgs e)
        {
            M009_Stocktaking frm_M009_Stocktaking = new M009_Stocktaking();
            frm_M009_Stocktaking.storageRoomID = cmbStoreRoom.SelectedValue.ToString();
            frm_M009_Stocktaking.StartPosition = FormStartPosition.CenterScreen;
            frm_M009_Stocktaking.ShowDialog();
            GlobalVal.gloformStoreRoomSelect = this;
        }

        private void FormStoreRoomSelect_Load(object sender, EventArgs e)
        {
            InitComBox();
        }

        /// <summary>
        /// <p><b>方法名称</b>InitComBox</p>	
        /// <p><b>概要説明	:</b>ComBoxの初期化する</p>	
        /// <p><b>作成者	:</b>万岗</p>	
        /// <p><b>作成日	:</b>2008/09/03</p>	
        /// </summary>
        private void InitComBox()
        {
            Method.CmbDataBound("STOREROOM_ID", cmbStoreRoom);
            cmbStoreRoom.SelectedIndex = 0;
        }
    }
}
